<template>
    <view>
        <kt-popup
        @close="close"
        :zIndex="zIndex"
        ref="ktPopup">
            <view>
                <LoginBottomCard
                @loginSuccess="loginSuccess"
                ></LoginBottomCard>
            </view>
        </kt-popup>
    </view>
</template>

<script>
import LoginBottomCard from './components/LoginBottomCard.vue';
import ktPopup from '../kt-popup/kt-popup.vue';
export default {
    name: "kt-login-popup",
    components: {
        ktPopup,
        LoginBottomCard,
    },
    props:{
        zIndex:{
            type: Number,
            default: 9999
        },
    },
    data(){
        return {
        }
    },
    mounted(){
        this.$kt.event.on("login:success",()=>{
            this.close();
        });
    },
    methods:{
        loginSuccess(){
            this.close();
        },
        open(){
            this.$refs.ktPopup.open();
        },
        close(){
            this.$refs.ktPopup.close();
            this.$emit('close');
        },

    },
}
</script>

<style lang="scss" scoped>

</style>